package com.tgit.sso.client.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.tgit.sso.core.conf.SsoConf;
import com.tgit.sso.core.conf.SsoUser;
/**
 * controller层
 * @author 范再军
 * 2018年9月18日
 */
@Controller
public class IndexController {
    @RequestMapping("/")
    public String index(Model model, HttpServletRequest request) {

        SsoUser ssoUser = (SsoUser) request.getAttribute(SsoConf.SSO_USER);
        model.addAttribute("ssoUser", ssoUser);
        return "index";
    }
}
